import json
# 读取txt文件中的json数据
jsonStr = open("D:\\json.txt", "r").read()


# 编写对应的UserInfo类
class UserInfo:
    def __str__(self):
        return "邮箱：{}  姓名：{}  密码：{}  QQ：{}".format(self.email, self.name, self.password, self.qq)


userInfosDict = json.loads(jsonStr)
userInfos = []

for i in range(len(userInfosDict)):
    userInfo = UserInfo()
    userInfo.__dict__ = userInfosDict[i]
    userInfos.append(userInfo)


for i in userInfos:
    print(i.__str__())